/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ipo.mm.web.formbeans;

import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.ipo.mm.web.util.ConstantManager;

/**
 *
 * @author makcro
 */
public class QuickSearchBean extends org.apache.struts.action.ActionForm {

    private String query;
    
    private boolean meetings;
    private boolean institutions;
    private boolean representatives;

    public boolean isRepresentatives() {
        return representatives;
    }

    public void setRepresentatives(boolean representatives) {
        this.representatives = representatives;
    }
    
    public boolean isInstitutions() {
        return institutions;
    }

    public void setInstitutions(boolean institutions) {
        this.institutions = institutions;
    }

    public boolean isMeetings() {
        return meetings;
    }

    public void setMeetings(boolean meetings) {
        this.meetings = meetings;
    }

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        try {
            this.query = new String(query.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(QuickSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    



    /**
     *
     */
    public QuickSearchBean() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = super.validate(mapping, request);
        
        return errors;
    }

    @Override
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        
    }


}
